package com.zzzzzz.topic.topic;

import java.util.Date;

import com.zzzzzz.common.util.StringPool;
import com.zzzzzz.common.util.StringUtil;
import com.zzzzzz.common.util.Util;

public class SimpleTopicBo {

	private Topic _topic;
	
	public SimpleTopicBo(Topic topic) {
		_topic = topic;
	}

	public Topic geTopic() {
		return _topic;
	}
	
	public String getTopicId() {
		return _topic.getTopicId();
	}
	public String getThumbnailId() {
		return _topic.getThumbnailId();
	}
	public String getDescription() {
		return StringUtil.shorten(_topic.getDescription(), 200);
	}
	public String getCategory() {
		return _topic.getCategory();
	}
	public String getUserId() {
		return _topic.getUserId();
	}
	public String getThumbnailDimension() {
		return _topic.getThumbnailDimension();
	}
	public String getThumbnailHeight() {
		return StringUtil.split(getThumbnailDimension(), StringPool.DASH)[1];
	}
	public String getThumbnailWidth() {
		return StringUtil.split(getThumbnailDimension(), StringPool.DASH)[0];
	}
	public Date getCreateDate() {
		return _topic.getCreateDate();
	}
	public String getDisplayDate() {
		return Util.getTimeDifferent(getCreateDate(), new Date());
	}
}
